package ua.eug.robov2.schematic.chips;

import ua.eug.robov2.schematic.SheetMap;
import ua.eug.robov2.utils.Vector2i;

public class ChipNot extends Chip {
	final static int [][] map = {
		{-1,-1,-1,-1,-1,-1,-1,-1},
		{1,1,0,0,0,0,2,2},
		{-1,1,0,0,0,0,2,-1},
		{1,1,0,0,0,0,2,2},
		{-1,-1,-1,-1,-1,-1,-1,-1}
	};
	final static Vector2i[] pinPosS = {
		new Vector2i(1,2),
		new Vector2i(6,2)
	};


	public ChipNot () {
		pins = new Pin[2];
		pinPos = pinPosS;
		pins[0] = new Pin(0,0);
		pins[1] = new Pin(0,1);
		chipMap = new SheetMap(map);
		name = "chipnot";
	}

	@Override
	public void act() {
		pins[1].state = ! pins[0].state;		
	}

}
